import React from 'react'
import { Button, Tag } from 'antd'
import ProTable from '@ant-design/pro-table'
import request from '@/utils/request'
export default () => {


    const columns: any = [
        {
            title: '操作者',
            dataIndex: 'store_title'
        },
        {
            title: '操作记录',
            dataIndex: 'store_user_name',
        },
        {
            title: '操作IP地址',
            dataIndex: 'level_title',
            hideInSearch: true,
            render: (text: any) => <Tag color="cyan">{text}</Tag>
        },
        {
            title: '最后登录时间',
            dataIndex: 'updated_at',
            hideInSearch: true,
        },
        {
            title: '操作时间',
            dataIndex: 'is_own',
            hideInSearch: true,
            width: "100px",
            align: "center",
            render: (text: any) => <Tag color={text ? "blue" : "red"}>{text ? "是" : "否"}</Tag>
        }
    ];
    return (

        <ProTable<any>
            toolBarRender={false}
            headerTitle={null}
            rowKey="id"
            rowSelection={false}
            columns={columns}
            tableAlertRender={false}
            request={(params: any) => request('/store/list', {
                params,
            })}
        />
    )
}